// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).
import * as goldengate from "oci-goldengate";
import common = require("oci-common");
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();
(async () => {
try {
// Create a service client
const client = new goldengate.GoldenGateClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updateDeploymentDetails = {
displayName: "EXAMPLE-displayName-Value",
licenseModel: goldengate.models.LicenseModel.BringYourOwnLicense,
description: "EXAMPLE-description-Value",
freeformTags: {
EXAMPLE_KEY_qm2gc: "EXAMPLE_VALUE_nyVaET5LOBzUZp8lM5ml"
},
definedTags: {
EXAMPLE_KEY_79ZYy: {
EXAMPLE_KEY_dbUgi: "EXAMPLE--Value"
}
},
nsgIds: ["EXAMPLE--Value"],
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
isPublic: false,
fqdn: "EXAMPLE-fqdn-Value",
cpuCoreCount: 5,
isAutoScalingEnabled: true,
oggData: {
credentialStore: goldengate.models.CredentialStore.Iam,
identityDomainId: "ocid1.test.oc1..<unique_ID>EXAMPLE-identityDomainId-Value",
passwordSecretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-passwordSecretId-Value",
adminUsername: "EXAMPLE-adminUsername-Value",
adminPassword: "EXAMPLE-adminPassword-Value",
certificate: "EXAMPLE-certificate-Value",
key: "EXAMPLE-key-Value"
},
maintenanceWindow: {
day: goldengate.models.Day.Tuesday,
startHour: 17
},
maintenanceConfiguration: {
isInterimReleaseAutoUpgradeEnabled: false,
interimReleaseUpgradePeriodInDays: 266,
bundleReleaseUpgradePeriodInDays: 194,
majorReleaseUpgradePeriodInDays: 975,
securityPatchUpgradePeriodInDays: 663
}
};
const updateDeploymentRequest: goldengate.requests.UpdateDeploymentRequest = {
deploymentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-deploymentId-Value",
updateDeploymentDetails: updateDeploymentDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "QDHYHXAPZJTO78GPYND1<unique_ID>"
};
// Send request to the Client.
const updateDeploymentResponse = await client.updateDeployment(updateDeploymentRequest);
} catch (error) {
console.log("updateDeployment Failed with error " + error);
}
})();